package config;

import iterators.IterationPhase;

import java.util.HashSet;
import java.util.Set;

import controlFlowGraph.Expression;
import controlFlowGraph.Variable;
import domains.Analysis;

public class GlobalConfig {
	
	public static IterationPhase iterPhase = IterationPhase.NORMAL;
	
	public static int maxNarrowingSteps = 50;

	public static int firstColumnWidth = 8;
	
	public static int secondColumnWidth = 25;
	
	// Global Configurations
	public static boolean debug = true;
	
	// Analysis related infos
	public static boolean isForward() {
		return (analysisType.equals(AnalysisTypes.AvailableExpressions)) ||
			(analysisType.equals(AnalysisTypes.IntervalAnalysis));
	}
	
	public static boolean isBackward() {
		return (analysisType.equals(AnalysisTypes.TrulyLiveVariables));
	}
	
	public static AnalysisTypes analysisType;
	
	public static Analysis analysis;
	
	public static FixpointAlgorithms algorithm;
	
	public static OutputFormat outputFormat;
	
	/**
	 * Set of all Variable
	 */
	public static Set<Variable> variableSet = new HashSet<Variable>();
	/**
	 * Set of all expressions
	 */
	public static Set<Expression> expressionSet = new HashSet<Expression>();
	
}
